<footer class="container">
  <div class="site-footer" role="contentinfo">
    <div class="copyright left mobile-block">
      © 2021
      <span title="{{ site.author}}">{{ site.author }}</span>
      <a href="javascript:window.scrollTo(0,0)" class="right mobile-visible">TOP</a>
    </div>

    <ul class="site-footer-links right mobile-hidden">
      <li>
        <a href="javascript:window.scrollTo(0,0)">TOP</a>
      </li>
    </ul>
    <a href="{{ site.github.repository_url }}" target="_blank" aria-label="view source code">
      <span class="mega-octicon octicon-mark-github" title="GitHub"></span>
    </a>
    <ul class="site-footer-links mobile-hidden">
      {% for nav in site.navs %}
      <li>
        <a href="{{ site.url }}{{ nav.href }}" title="{{ nav.label }}"
          target="{{ nav.target | default: _self }}">{{ nav.label }}</a>
      </li>
      {% endfor %}
      <li><a href="{{ site.url }}{{ site.subscribe_rss }}"><span class="octicon octicon-rss"
            style="color:orange;"></span></a></li>
    </ul>
    <span>running：<span id="runDate" style="color: green;"></span>
    <span id="busuanzi_container_site_pv">本站总访问量<span id="busuanzi_value_site_pv"></span>次</span>
  </div>
</footer>
<div class="tools-wrapper">
  <a class="gotop" href="#" title="回到顶部"><span class="octicon octicon-arrow-up"></span></a>
</div>
<!-- / footer -->
<script src="{{ site.url }}/assets/vendor/share.js/dist/js/share.min.js"></script>
<script src="{{ site.url }}/assets/js/geopattern.js"></script>
<script src="{{ site.url }}/assets/js/prism.js"></script>
<link rel="stylesheet" href="{{ site.url }}/assets/css/globals/prism.css">
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script>
  jQuery(document).ready(function ($) {
    // geopattern
    $('.geopattern').each(function () {
      $(this).geopattern($(this).data('pattern-id'));
    });
    // hljs.initHighlightingOnLoad();
  });
</script>

{% if page.mermaid %}
<script src="{{ site.url }}/assets/js/mermaid.min.js"></script>
<script>mermaid.initialize({ startOnLoad: true });</script>
{% endif %}

{% if page.sequence %}
<script src="{{ site.url }}/assets/js/webfont.js"></script>
<script src="{{ site.url }}/assets/js/snap.svg-min.js"></script>
<script src="{{ site.url }}/assets/js/underscore-min.js"></script>
<script src="{{ site.url }}/assets/vendor/js-sequence-diagrams/dist/sequence-diagram-min.js"></script>
<link rel="stylesheet" href="{{ site.url }}/assets/vendor/js-sequence-diagrams/dist/sequence-diagram-min.css">
<script>
  $(".language-sequence").sequenceDiagram({ theme: 'simple' });
</script>
{% endif %}

{% if page.flow %}
<script src="{{ site.url }}/assets/js/raphael.min.js"></script>
<script src="{{ site.url }}/assets/vendor/flowchart.js/dist/flowchart.min.js"></script>
<script src="{{ site.url }}/assets/js/flow.js"></script>
{% endif %}

{% if page.mathjax %}
<script type="text/javascript"
  src="https://basis-learning.github.io/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
{% endif %}

{% if site.google.analytics_id %}
<div style="display:none">
  <script>
    (function (i, s, o, g, r, a, m) {
      i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
        (i[r].q = i[r].q || []).push(arguments)
      }, i[r].l = 1 * new Date(); a = s.createElement(o),
        m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
    })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');

    ga('create', '{{ site.google.analytics_id }}', 'auto');
    ga('send', 'pageview');

  </script>
</div>
{% endif %}
<script>
  let runDate = document.getElementById('runDate');
  function dayCha() {
    var timeMiao = new Date('2017-07-16').getTime()
    var year = new Date('2017-07-16').getFullYear()
    var month = new Date('2017-07-16').getMonth() + 1;
    var date = new Date('2017-07-16').getDate();
    var thatYear = new Date().getFullYear();
    var thatTimeMiao = new Date().getTime();
    var chaTime = thatTimeMiao - timeMiao;
    var day = parseInt(chaTime / 86400000)
    var yu = chaTime % 86400000
    var hour = parseInt(yu / 3600000)
    var yuH = yu % 3600000
    var min = parseInt(yuH / 60000)
    var yuM = yuH % 60000
    var sec = parseInt(yuM / 1000)
    var yYear = 0
    var yDay = 0;
    for (let x = 0; x <= thatYear - year; x++) {
      var fYear = year + x
      var fTime = new Date('' + fYear + '/' + month + '/' + date + '').getTime();
      var fDay = parseInt((fTime - timeMiao) / 86400000)
      if (fDay > 0 && fDay <= day) {
        yYear = yYear + 1;
        yDay = day - fDay
      }
    }
    return { yYear: yYear, yDay: yDay, day: day, hour: hour, minute: min, second: sec }
  }
  setInterval(()=>{
    let dateObj = dayCha();
    let str = `${dateObj.yYear}年${dateObj.yDay}天${dateObj.hour}小时${dateObj.minute}分钟${dateObj.second}秒`;
    runDate.innerText = str;
  }, 1000)
</script>
</body>

</html>